package com.qishi.exampleFive;

import com.qishi.exampleFour.Seller;
import com.qishi.exampleFour.Waiter;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestDefaultAdvisorAutoProxyCreator {

    public static void main(String[] args) {
        String configPath = "example5-2.xml";

        ApplicationContext ctx =  new ClassPathXmlApplicationContext(configPath);
        Waiter waiter = (Waiter)ctx.getBean("waiter");
        Seller seller = (Seller)ctx.getBean("seller");

        waiter.serviceTo("John");
        waiter.greetTo("John");

        seller.greetTo("Tom");
    }
}
